package com.amado.springcloud.user.fegin;

import com.amado.springcloud.user.entity.User;
import com.amado.springcloud.user.vo.SNSResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

@RequestMapping("/fegin-user")
//项目名称
@FeignClient(name = "user-service")
public interface UserFeign {
    @GetMapping("/{id}")
    SNSResult<User> getUser(@PathVariable("id") Long id);

    @PostMapping
    SNSResult<Void> addUser(@RequestBody User user);

    @PutMapping
    SNSResult<Void> updateUser(@RequestBody User user);

    @DeleteMapping
    SNSResult<Void> deleteUser(@RequestParam("id") Long id);
}